<?php
/**
 * CompleXml Framework
 *
 * @category   CompleXml
 * @package    CompleXml_Validate
 * @copyright  Copyright (c) 2008 Andrey Kucherenko
 * @license    New BSD License
 * @version    0.1
 */

/**
 * @see CompleXml/Validate/Abstract.php
 */
require_once 'CompleXml/Validate/Abstract.php';
class CompleXml_Validate_Email extends CompleXml_Validate_Abstract
{
    public function isValid ($value)
    {
        $valueString = (string) $value;
            
        if (! eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](g|l|m|pa|t|u|v)?$", $valueString)) {
            return false;
        }
        return true;
    }
}